<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>
    <body>
        <script>
            let email = '2300071698@qq.com'
            let content = email.replace(/(\w+)(@\w+\.com)/, function (...match) {
                return match[1].slice(0, -3) + '*'.repeat(3) + match[2]
            })
            console.log(content)
        </script>
    </body>
</html>
